<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>null和undefined</title>
</head>
<body>
    <script>
        // 定义一个引用数据类型
        let a = null;
        let b = [];
        let c = {};

        // 定义一个普通数据类型
        let d = undefined;
        let f = "";

        function star(num){
            
            num = num || 5;

            // if(num == undefined){
            //     num = 5;
            // }

            for(let i = 0; i < num; i++){
                document.write("*");
            }
        }

        star();

    </script>
</body>
</html>